Passed
Push — main ( 0e3197...a3863e )
by Pieter Epeüs
04:16 queued 01:18
created

RateLimitError.name   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
ccs 1
cts 1
cp 1
c 0
b 0
f 0
rs 10
cc 1
crap 1
1
import makeAppError from './app-error.js';
2
3 9
const AppError = makeAppError(TypeError);
4
5
class RateLimitError extends AppError {
6
    /**
7
     * Get the error name
8
     *
9
     * @return {string}
10
     */
11
    get name() {
12 7
        return 'RateLimitError';
13
    }
14
15
    /**
16
     * Get the error status
17
     *
18
     * @return {number}
19
     */
20
    get errorStatus() {
21 4
        return 429;
22
    }
23
}
24
25
export default RateLimitError;
26